package com.mouse.remind;

import android.app.KeyguardManager;
import android.content.Context;
import android.os.PowerManager;

public class StaticKeyguardLock {
	private static KeyguardManager.KeyguardLock sLock = null;

	static void disabledKeyguard(Context context)
	{
		KeyguardManager km = (KeyguardManager)context.getSystemService(Context.KEYGUARD_SERVICE);
		if(sLock == null)
			 sLock = km.newKeyguardLock("alarm"); 
		sLock.disableKeyguard();
	}

	public static void enabledKeyguard()
	{
		if(sLock != null)
		{ 
			sLock.reenableKeyguard();
			sLock = null;
		}
	}
}